#include <cstdio>

int main( )
{
    int t, i, j, n;
    scanf("%d", &t);
    while ( t-- )
    {
        scanf("%d", &n);
        for ( i = 0; i < n * 3; i++ )
        {
            for ( j = 0; j < n; j++ )
                printf("HDU");
            printf("\n");
        }
    }
    return 0;
}
